<?php 
class locations_Form_FrmLocation extends Zend_Form
{
	public function frmLocation($frm = null)
    {
    	$location = new Zend_Form_Element_Text('location_name');
    		$location->setAttribs(array('class'=>'form-control validate[required]',));
    		
    	$status = new Zend_Form_Element_Select('status');
    		$status->setAttribs(array('class'=>'form-control validate[required]'));
    	$opt = array(''=>'ជ្រើសរើស ស្ថានភាព','1'=>'ប្រើប្រាស់','0'=>'មិនប្រើប្រាស់');
    	$status->setMultiOptions($opt);
    	$id = new Zend_Form_Element_Hidden('id');
    	$this->addElements(array($location,$status,$id));    	
    	if($frm){
    		$id->setValue($frm['location_id']);
    		$location->setValue($frm['location_name']);
    		$status->setValue($frm['status']);
    	}
    	return $this;
     }
}
?>
